<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>业务规则调用日志列表</title>
<link href="../../static/plugin/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
<link href="../../static/plugin/easyui/themes/bootstrap/easyui.css" rel="stylesheet" type="text/css"/>
<link href="../../static/plugin/easyui/themes/icon.css" rel="stylesheet" type="text/css"/>
<script src="../../static/plugin/easyui/jquery.min.js" type="text/javascript"></script>
<script src="../../static/plugin/easyui/jquery.easyui.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../../static/plugin/easyui/locale/easyui-lang-zh_CN.js" type="text/javascript"></script>
<script src="../../static/plugin/assets/jslib.util.js" type="text/javascript"></script>
<script src="../../static/plugin/assets/jslib.jquery.ajax.js" type="text/javascript"></script>
<script src="../../static/plugin/assets/jslib.easyui.util.js" type="text/javascript"></script>
<script src="../../ffres/dict/all.js" type="text/javascript"></script>
<a href="" target="_blank" id="commonLink" name="commonLink"></a>
</head>
<script type="text/javascript">

	function doAdd(){
		JLEUtil.createModalWin('新增', 'BizRuleLogAdd.html');
	}
	
	function doUpdate() {
		var row = $('#dg').datagrid('getSelected');
		if (row){
			JLEUtil.createModalWin('修改', 'BizRuleLogUpdate.html?' + 'logId=' + row.logId);
		} else {
			$.messager.alert('提示','请选择一条记录！','info');
		}
	}
	
	function doDelete(){
		var row = $('#dg').datagrid('getSelected');
		if (row) {
			$.messager.confirm('删除提示', '你确定要删除这条记录?', function(r){
				if (r){
					var jsonData = JSON.parse('{'+'"logId":"' + row.logId + '"'+'}');
					$.restfulDelete('../../api/biz/rule/log', jsonData, function(data) {
						$.messager.alert('提示','记录删除成功!','info');
						$('#dg').datagrid('reload');
					});
				}
			});
		} else {
			$.messager.alert('提示','请选择一条记录！','info');
		}
	}

	function doView(){
		var row = $('#dg').datagrid('getSelected');
		if (row) {
			JLEUtil.createFullModalWin('详情','BizRuleLogView.html?' + '&logId=' + row.logId);
		} else {
			$.messager.alert('提示','请选择一条记录！','info');
		}
	}

	function onDbClickToView(index,row){
		if (row) {
			JLEUtil.createFullModalWin('详情','BizRuleLogView.html?' + '&logId=' + row.logId);
		} else {
			$.messager.alert('提示','请选择一条记录！','info');
		}
	}

	function reloadList(){
		$('#dg').datagrid('reload');
		JLEUtil.closewin();
	};	
</script>
<body class="easyui-layout">
<div data-options="region:'north',title:'',minHeight: 100">
	<form id="searchForm" class="control-form center-block ">
		<div class="row">
			<div class="form-group col-md-4 row">
				<label for="logId" class="col-md-4 control-label">日志记录标识：</label>
				<div class="col-md-8">
					<input type="text" class="form-control input-sm" name="logId" id="logId">
				</div>
			</div>
			<div class="form-group col-md-4 row">
				<label for="bizSerno" class="col-md-4 control-label">业务流水号：</label>
				<div class="col-md-8">
					<input type="text" class="form-control input-sm" name="bizSerno" id="bizSerno">
				</div>
			</div>
			<div class="form-group col-md-4">
				<a class="easyui-linkbutton" href="javascript:void(0);" onclick="JLEUtil.queryForm('searchForm','dg','../../api/biz/rule/logs');">查找</a>
				<a class="easyui-linkbutton" href="javascript:void(0);" onclick="JLEUtil.clearForm('searchForm');">清空</a>
			</div>
		</div>
	</form>
</div>
<div data-options="region:'center',split:false">
<table id="dg" class="easyui-datagrid" title="" style="width:100%;height:100%"
			data-options="singleSelect:true,collapsible:true,url:'../../api/biz/rule/logs',method:'post',onDblClickRow:onDbClickToView"
			toolbar="#tb"
		title="Load Data" 
		rownumbers="true" pagination="true" pageSize="10">
		<thead>
			<tr>
				<!--<th data-options="field:'logId',resizable:true" >日志记录标识</th>-->
				<th data-options="field:'bizSerno',resizable:true" >业务流水号</th>
				<th data-options="field:'ruleExecResult',resizable:true" >规则执行结果</th>
				<th data-options="field:'operUserid',resizable:true" >操作人</th>
				<th data-options="field:'operTime',resizable:true" >操作时间</th>
				<th data-options="field:'ruleTargetType',resizable:true" formatter="formatter_RULE_TARGET_TYPE">目标规则类型</th>
				<th data-options="field:'ruleTargetId',resizable:true" >目标规则ID</th>
				<th data-options="field:'ruleTargetName',resizable:true" >目标规则名称</th>
				<th data-options="field:'requestBody',resizable:true,width:200" >请求信息</th>
				<th data-options="field:'responseBody',resizable:true,width:200" >响应信息</th>
				<th data-options="field:'adapterOrgNo',resizable:true" >适配机构代码</th>
				<th data-options="field:'adapterOrgName',resizable:true" >适配机构名称</th>
				<th data-options="field:'adapterFlowId',resizable:true" >适配流程ID</th>
				<th data-options="field:'adapterFlowName',resizable:true" >适配流程名称</th>
				<th data-options="field:'adapterPrdCode',resizable:true" >适配产品编号</th>
				<th data-options="field:'adapterPrdName',resizable:true" >适配产品名称</th>
				<th data-options="field:'adapterSysCode',resizable:true" >适配业务系统代码</th>
				<th data-options="field:'adapterCustomDim1',resizable:true" >适配的自定义维度1</th>
				<th data-options="field:'adapterCustomDim2',resizable:true" >适配的自定义维度2</th>
			</tr>
		</thead>
	</table>
</div>
<div id="tb" style="padding:1px">
	<div style="margin-bottom:2px">
		<a href="javascript:doView()" class="easyui-linkbutton" iconCls="icon-ok" plain="true">查看</a>
	</div>
</div>
</body>
</html>
